<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta content="always" name="referrer">
		<meta name="format-detection" content="telephone=no" />
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<title>我的</title>
		<link rel="stylesheet" href="/LianniuWeb/tea/css/reset.css">
		<link rel="stylesheet" href="/LianniuWeb/tea/css/swiper3.1.0.min.css">
		<link rel="stylesheet" href="/LianniuWeb/tea/views/my/my.css">
	</head>

	<body>
		<div class="my-top">
			<div class="my-photo clear" >
				<span class="fl" id="addPic"></span>
				<p class="fl" id="usernameandpassword"></p>
				<div style="display:none;" id="hidenum"></div> 
			</div>
			<!-- <div class="integral-box">
				<span>登录查积分</span>
			</div> -->
		</div>
		<div class="my-list">
			<div class="my-item">
				<span class="my18">我的发布</span>
			</div>
			<div class="my-item">
				<span class="my19">我的资金</span>
			</div>
			<div class="my-item">
				<span class="my20">我的订单</span>
			</div>
			<div class="my-item">
				<span class="my21">我的收藏</span>
			</div>
			<div class="my-item">
				<span class="my22">历史记录</span>
			</div>
			<div class="my-item">
				<span class="my23">消息中心</span>
			</div>
			<div class="my-item">
				<span class="my24">交易土地</span>
			</div>
			<div class="my-item">
				<span class="my25">我的设置</span>
			</div>
		</div>
		<div class="detail-bottom">
			<div class="index1-gary">
				<p id="index"></p>
				<span>首页</span>
			</div>
			<div class="index2-gray">
				<p id="tea-market"></p>
				<span>茶山市场</span>
			</div>
			<div class="index3-gray">
				<p></p>
				<span>发布</span>
			</div>
			<div class="index4-gray">
				<p id="inf"></p>
				<span>茶讯头条</span>
			</div>
			<div class="index5-green">
				<p></p>
				<span class="color-green">我的</span>
			</div>
		</div>
		<div class="demand-btn"></div>
		<script type="text/javascript" src="/LianniuWeb/tea/js/flexible.js"></script>
		<script src="/LianniuWeb/tea/build/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="/LianniuWeb/tea/js/jquery-1.11.3.min.js"></script>
		<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script type="text/javascript" src="/LianniuWeb/js/commons/commons.js"></script>
		<script type="text/javascript" src="/LianniuWeb/tea/views/my/my.js"></script>
		<script>
			//查询用户是否登录
			if( null != localStorage.getItem("username")){
				var username = localStorage.getItem("username");
				var userpasswd = localStorage.getItem('userpasswd');
				$(function() {
					$.ajax({
						type : "post",
						url : server_url + 'rest/isLogin.do?ran='
								+ Math.random(),
						dataType : 'json',
						async : false,
						data : {
							username : username,
							userpasswd : userpasswd
						},
						success : function(result) {
							if (result.retCode == '0000') {
								$("#usernameandpassword").append("<p class='fl'>"+result.data.userName+"</p>");
								$("#hidenum").html("woaini");
								if(result.data.picPath != null && "" != result.data.picPath){
									$(".my-photo > span").css('background','url('+result.data.picPath+') no-repeat');
									$(".my-photo > span").css('width','1.33rem');
									$(".my-photo > span").css('height','1.33rem');
									$(".my-photo > span").css('background-size','contain');
									//$("#addPic").html('<img src="'+result.data.picpath+'" alt="">');
								}else{
									$(".my-photo > span").css('background','url(/LianniuWeb/tea/images/my2.png) no-repeat');
									$(".my-photo > span").css('width','1.33rem');
									$(".my-photo > span").css('height','1.33rem');
									$(".my-photo > span").css('background-size','contain');
									
									/* background: url(../../images/my2.png) no-repeat; */
									
								}
							} 
						},
						error : function(result){
							
							$("#usernameandpassword").append("<p class='fl'><a href='#' class='login' style='color: white'>登录/注册</a></p>");
						}
					});
				});
			}else{
				$("#usernameandpassword").append("<p class='fl'><a href='#' class='login' style='color: white'>登录/注册</a></p>");
			}	
		</script>
	</body>

</html>
